package com.xxxx.manager.export;

import com.xxxx.api.service.GoodsCategoryExportService;
import com.xxxx.manager.mapper.GoodsCategoryMapper;
import com.xxxx.api.vo.GoodsCategoryTree;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lwf
 * @title: GoodsCategoryExport
 * @projectName shop
 * @description: TODO
 * @date 2021/1/58:57
 */
@Component
@Service
public class GoodsCategoryExport implements GoodsCategoryExportService {
    @Resource
    private GoodsCategoryMapper categoryMapper;

    /**
     * 暴露商品
     * @param id
     * @return
     * @throws Exception
     */
    @Override
    public List<GoodsCategoryTree> getTree(Integer id) throws Exception {
        return categoryMapper.selectTreeGoodsCategory(id);
    }
}
